package group2assignone.dao;

import group2assignone.model.*;
import group2assignone.model.Customer;
import group2assignone.model.Flight;
import group2assignone.model.Manager;
import group2assignone.model.Person;
import group2assignone.model.TicketComponent;
import java.util.ArrayList;

/**
 *
 * @author Group 2
 *
 * Class MySqlComms:
 * A Singleton class which handles all communications to the MySQL database.
 * connects with
 *  userName = "3120S109g02";
 * password = "cc03086abb";
 * and the  url = "jdbc:mysql://dunk.it.jcu.edu.au:3306/3120S109g02";
 *
 * within this class persons, flights and bookings can be added, deleted, edited and found.
 */
public interface MyDAO {

    /**
     * 
     * @param c
     * @return
     */
    public boolean sQLAddCustomer(Customer c);

    public boolean sQLAddManager(Manager m);

    public boolean sQLAddPromotion(Flight f);

    public boolean sQLDeleteCustomer(String userName);

    public boolean sQLDeleteManager(String userName);

    public ArrayList<Manager> sQLGetAllFromManager();

    public boolean sQLEditCustomer(Customer c, String uNameOld);

    public boolean sQLEditManager(Manager m, String uNameOld);

    public Customer sQLGetCustomer(String uName);

    public Manager sQLGetManager(String uName);

    public Person sQLFindPerson(String uName);

    public boolean sQLCreateFlight(Flight flt);

    abstract public boolean sQLEditFlight(Flight flt, String flightNumOld);

    public boolean sQLDeleteFlight(String flightNum);

    public boolean sQLMakeBooking(TicketComponent t, String bookingNum);

    public ArrayList<Flight> sQLSearchFlights(Flight flt);

    public boolean sQLCustomerExists(Customer cust);

    public boolean sQLManagerExists(Manager man);

    public Flight sQLGetFlight(String fnum);

    public ArrayList<Flight> getFlights();

    public boolean sQLAddAirport(Airport airport);

    public ArrayList<Airport> sQLGetAirports();

    public boolean sQLEditAirport(Airport ap, String airportLocOld);

    public boolean sQLDeleteAirport(String airportLoc);

}





